<template>
	<view>
		<view class="account themeBac cwhite f-b">
			<view class="account-left f-c f30">
				<image src="../../static/my/icon_zhye.png" mode="widthFix"></image>
				<text>账户余额</text>
			</view>
			<view class="account-right f36">￥{{money}}</view>
		</view>
		
		<view class="btn">
			<button @click="toNext" class="themeBac cwhite f36">提现</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money:""
			}
		},
		onShow() {
			this.accountBalance()
		},
		methods: {
			async accountBalance(){
				const res =await this.$u.api.accountBalance({
					id:this.vuex_user.id
				})
				console.log(res);
				this.money=res.data.money
			},
			toNext(){
				this.$to('../wallet-withdraw/wallet-withdraw')
			}
		}
	}
</script>

<style>
	.account {
		position: relative;
		margin: 25rpx 35rpx;
		border-radius: 10rpx;
		padding: 20rpx;
		height: 150rpx;
	}

	.account-left image {
		width: 40rpx;
		margin-right: 20rpx;
	}

	.account-right {
		position: absolute;
		right: 30rpx;
		bottom: 20rpx;
	}
	.btn{
		margin: 100rpx 60rpx;
	}
</style>
